<template>
  <div class="detail_list">
    <el-card class="detail">
      <el-table :data="salesData">
        <el-table-column align="center" prop="brand" label="品牌" />
        <el-table-column align="center" prop="daySales" label="今日销量" />
        <el-table-column align="center" prop="monthSales" label="月销量" />
        <el-table-column align="center" prop="allSales" label="总销量" />
      </el-table>
    </el-card>
  </div>
</template>

<script setup lang="ts" name="detailsList">
import { getSalesDataAPI } from '@/api/home'
import { ref, onMounted } from 'vue'

let salesData = ref([])

const getSalesData = async () => {
  const res: any = await getSalesDataAPI()
  if (res.code == 200) {
    salesData.value = res.items
  }
}
onMounted(() => {
  getSalesData()
})
</script>

<style scoped lang="less">
.detail_list {
  .detail {
    width: 100%;
    height: 550px;

    /deep/ .el-scrollbar {
      height: 481px;
      overflow: auto;
    }
  }
}
</style>